package cn.school.course.dao;

import cn.school.course.entity.CoursePlanConflict;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 排课计划-冲突情况Dao
 *
 * @className: CoursePlanConflictDao
 * @author: fangjin.tao
 * @date: 2023/1/4
 **/
@Mapper
public interface CoursePlanConflictDao extends BaseMapper<CoursePlanConflict> {
	
	
	List<CoursePlanConflict> selecByStatusNotGenner();
	
	void updateCpcoIsGennerCourse1(@Param("coplId") Long coplId);
	
	/**
	 * 更新老师冲突情况
	 *
	 * @throws
	 * @author fangjin.tao
	 * @param: conflictKey
	 * @updateTime 2023/2/3 16:50
	 */
	void updateByTeacherConfict(@Param("teacherConflictKey") String teacherConflictKey);
	
	/**
	 * 更新教室场地冲突情况
	 *
	 * @throws
	 * @author fangjin.tao
	 * @param: conflictKey
	 * @updateTime 2023/2/3 16:50
	 */
	void updateByClassRoomConfict(@Param("classRoomConflictKey") String classRoomConflictKey);
	
	/**
	 * 根据两种检测key获取冲突情况的ID列表
	 *
	 * @throws
	 * @author fangjin.tao
	 * @param: allTeacherKeyeyList
	 * @param: allRommKeyList
	 * @updateTime 2023/2/8 9:54
	 */
	List<Long> selectIdByKeyList(@Param("allTeacherKeyList") List<String> allTeacherKeyeyList, @Param("allRoomKeyList") List<String> allRommKeyList);
	
	/**
	 * 根据ID列表直接更新为不冲突
	 *
	 * @throws
	 * @author fangjin.tao
	 * @param: idList
	 * @updateTime 2023/2/8 10:51
	 */
	void updateToNotConflict(@Param("idList") List<Long> idList);
}
